Crate sn_transfers

source ·

Re-exports

Modules

  • This is a helper module to make it a bit easier and regular for API callers to instantiate an Rng when calling sn_transfers methods that require them.

Structs

  • Types used in the public API Represents a CashNote (CashNote).
  • Unspent Transaction (Tx) Output Information can be used by the Tx recipient of this output to check that they recieved money and to spend it
  • An encrypted message.
  • Types used in the public API This is the key that unlocks the value of a CashNote. Holding this key gives you access to the tokens of the CashNote with the corresponding UniquePubkey. Like with the keys to your house or a safe, this is not something you share publicly.
  • Load the genesis CashNote. The genesis CashNote is the first CashNote in the network. It is created without a source transaction, as there was nothing before it.
  • Types used in the public API sha3 256 hash used for Spend Reasons, Transaction hashes, anything hash related in this crate
  • A wallet that can only receive tokens.
  • Types used in the public API This is the MainPubkey to which tokens are send.
  • Types used in the public API A CashNote MainSecretKey is held by anyone who wants to send or receive tokens using CashNotes. It is held privately and not shared with anyone.
  • Types used in the public API An amount in SNT Nanos. 10^9 Nanos = 1 SNT.
  • Offline Transfer This struct contains all the necessary information to carry out the transfer. The created cash_notes and change cash_note from a transfer of tokens from one or more cash_notes, into one or more new cash_notes.
  • A signature.
  • Types used in the public API SignedSpend’s are constructed when a CashNote is logged to the spentbook.
  • Types used in the public API Represents the data to be signed by the DerivedSecretKey of the CashNote being spent.
  • Types used in the public API The address of a SignedSpend in the network. This is used to check if a CashNote is spent, note that the actual CashNote is not stored on the Network.
  • Types used in the public API
  • Transfer sent to a recipient
  • Types used in the public API

Enums

Functions

  • Construct a BLS secret key from a hex-encoded string.
  • Utilities exposed
  • Utilities exposed Create a first CashNote given any key (i.e. not specifically the hard coded genesis key). The derivation index is hard coded to ensure deterministic creation. This is useful in tests.
  • A function for creating an offline transfer of tokens. This is done by creating new cash_notes to the recipients (and a change cash_note if any) by selecting from the available input cash_notes, and creating the necessary spends to do so.
  • Utilities exposed Return if provided Transaction is genesis parent tx.
  • Utilities exposed
  • Parse a public address from a hex-encoded string.

Type Aliases

  • Types used in the public API This is used to generate a new UniquePubkey from a MainPubkey, and the corresponding DerivedSecretKey from the MainSecretKey of that MainPubkey.
  • Specialisation of std::Result.
  • Specialisation of std::Result.